import request from '@/utils/request'

// 创建职责与考核标准
export function createStaffDuty(data) {
  return request({
    url: '/biz/staff-duty/create',
    method: 'post',
    data: data
  })
}

// 更新职责与考核标准
export function updateStaffDuty(data) {
  return request({
    url: '/biz/staff-duty/update',
    method: 'put',
    data: data
  })
}

// 删除职责与考核标准
export function deleteStaffDuty(id) {
  return request({
    url: '/biz/staff-duty/delete?id=' + id,
    method: 'delete'
  })
}

// 获得职责与考核标准
export function getStaffDuty(id) {
  return request({
    url: '/biz/staff-duty/get?id=' + id,
    method: 'get'
  })
}

// 获得职责与考核标准分页
export function getStaffDutyPage(query) {
  return request({
    url: '/biz/staff-duty/page',
    method: 'get',
    params: query
  })
}

// 导出职责与考核标准 Excel
export function exportStaffDutyExcel(query) {
  return request({
    url: '/biz/staff-duty/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
